package homework.test1
//求一个正整数 倒转后加上1024的结果.比如 12345倒转后是54321,加上1024，结果是55345.

import scala.io.StdIn

object ReverseNumber {
  def reverseNumber(num:Int): Int = {
    val str = num.toString
    val str1 = str.reverse
    val num1 = str1.toInt
     num1+1024
  }

  def main(args: Array[String]): Unit = {
    println("请输入一个整数：")
    val num = StdIn.readInt()
    val result = reverseNumber(num)
    println(result)
  }

}
